import { requestClient } from '#/api/request';

export namespace XhsApi {
  /** 小红书列表接口参数 */
  export interface XhsListParams {
    username: string;
    key_word: string;
    current_page: number;
  }

  /** 小红书信息接口 */
  export interface XhsInfo {
    id: number;
    username: string;
    key_word: string;
    at_xhs_user: string;
    at_xhs_user_id: string;
    at_xhs_user_head: string;
    create_time: string;
    current_page: number;
    total_page: number;
  }

  /** 接口返回数据结构 */
  export interface XhsResponse {
    code: number;
    message: string;
    data: XhsInfo[];
  }
}

/**
 * 获取订单列表
 */
export async function getXhsListApi(params: XhsApi.XhsListParams) {
  return requestClient.post<XhsApi.XhsInfo[]>('/v1/xhs/all/user', params);
}
